home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Space Simulation Series 1: Lift Off
/
Liftoff Space Simulation Series Part 1 (ETI Entertainment)(2002).iso
/
Exploration
/
globals
/
javascript.js
< prev
next >
Wrap
Text File
|
2002-06-28
|
2KB
|
58 lines
//how is this code used?
function newWindow(nwurl,nwspecs){
window.open(nwurl,'contentWindow', nwspecs);
}
// specs gets set to a string with this exact order:
// 'toolbar=no,location=no,scrollbars=auto,width=360,height=370' (horizontal window)
// 'toolbar=no,location=no,scrollbars=auto,width=280,height=460' (vertical window)
//open popup windows from all pages
function imageWindow(nwurl,width,height) {
var name = nwurl.substring(6, nwurl.indexOf("."));
width = width + 25;
height = height + 100;
popupWindow = window.open(nwurl,'window_'+name, 'toolbar=no,resizable=yes,scrollbars=auto,modal=yes,width='+width+',height='+height+',screenX=40,screenY=60,left=40,top=60');
popupWindow.focus();
}
//open activity windows (from space imaging)
function openActivityWindow(nwurl,width,height){
var browserWidth = screen.availWidth;
var windowHPos = ((browserWidth/2) - (width/2));
var browserHeight = screen.availHeight;
var windowVPos =((browserHeight/2) - (height/2));
activityWindow = window.open(nwurl, 'activityWindow', 'toolbar=no,resizable=yes,width='+width+',height='+height+',screenX='+windowHPos+',screenY='+windowVPos+',left='+windowHPos+',top='+windowVPos);
activityWindow.focus();
}
//open table window (from space race)
function tableWindow(nwurl,width,height) {
width = width + 20;
height = height + 20;
tableWindow = window.open(nwurl,'contentWindow', 'toolbar=no,location=no,scrollbars=yes,width='+width+',height='+height+',screenX=0,screenY=0,left=0,top=0');
tableWindow.focus();
}
//open glossary window from the_story pages and benefits pages
function glossaryItem(word) {
//alert('I am going to the glossary to find the word: ' + word);
glossaryWindow = window.open('../../glossary/index.html#' + word ,'glossary', 'toolbar=no,location=no,scrollbars=yes,width=350,height=200');
glossaryWindow.focus();
}
//open glossary window from canadas_role and careers pages
function glossaryItemCanada(word) {
//alert('I am going to the glossary to find the word: ' + word);
window.open('../glossary/index.html#' + word ,'glossary', 'toolbar=no,location=no,scrollbars=yes,width=350,height=200');
glossaryWindow.focus();
}